FROM amd64/python:3.12-rc-slim

LABEL name="XHS-Downloader" version="2.2" authors="JoeanAmier"

WORKDIR /code

COPY locale /code/locale
COPY source /code/source
COPY static /code/static
COPY LICENSE /code/LICENSE
COPY main.py /code/main.py
COPY requirements.txt /code/requirements.txt

RUN pip install --no-cache-dir --trusted-host pypi.tuna.tsinghua.edu.cn -i https://pypi.tuna.tsinghua.edu.cn/simple -r requirements.txt

EXPOSE 8000

CMD ["python", "main.py"]